/*
 * event.wsdl web service operations
 * implemention
 *
 */

#include "../soapH.h"
#include "../onvif.h"
#include "event_service.h"

int get_eventservice_cap(struct soap *soap, struct tev__Capabilities *event)
{
	if(soap == NULL || event == NULL)
	{
		DBG("invalid params!\n");
		return -1;
	}

	event->WSSubscriptionPolicySupport = (enum xsd__boolean*)soap_malloc(soap, sizeof(enum xsd__boolean));
	event->WSPullPointSupport = (enum xsd__boolean*)soap_malloc(soap, sizeof(enum xsd__boolean));
	event->WSPausableSubscriptionManagerInterfaceSupport = (enum xsd__boolean*)soap_malloc(soap, sizeof(enum xsd__boolean));

	*event->WSSubscriptionPolicySupport = events_caps[EVENT_CAP_SPS];
	*event->WSPullPointSupport = events_caps[EVENT_CAP_PPS];
	*event->WSPausableSubscriptionManagerInterfaceSupport = events_caps[EVENT_CAP_PSMIS];

	event->__size = 0;
	event->__any = NULL;
	event->__anyAttribute = NULL;

	return 0;
}

//=============================================================================//
/** Auto-test server operation __tev__PullMessages */
int __tev__PullMessages(struct soap *soap, struct _tev__PullMessages *tev__PullMessages, struct _tev__PullMessagesResponse *tev__PullMessagesResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__SetSynchronizationPoint */
int __tev__SetSynchronizationPoint(struct soap *soap, struct _tev__SetSynchronizationPoint *tev__SetSynchronizationPoint, struct _tev__SetSynchronizationPointResponse *tev__SetSynchronizationPointResponse)
{	
	return SOAP_OK;
}


/** Auto-test server operation __tev__GetServiceCapabilities */
int __tev__GetServiceCapabilities(struct soap *soap, struct _tev__GetServiceCapabilities *tev__GetServiceCapabilities, struct _tev__GetServiceCapabilitiesResponse *tev__GetServiceCapabilitiesResponse)
{	
	/* Return incomplete response with default data values */
	INFO(stderr);

	tev__GetServiceCapabilitiesResponse->Capabilities = (struct tev__Capabilities*)soap_malloc(soap, sizeof(struct tev__Capabilities));
	get_eventservice_cap(soap, tev__GetServiceCapabilitiesResponse->Capabilities);

	return SOAP_OK;
}


/** Auto-test server operation __tev__CreatePullPointSubscription */
int __tev__CreatePullPointSubscription(struct soap *soap, struct _tev__CreatePullPointSubscription *tev__CreatePullPointSubscription, struct _tev__CreatePullPointSubscriptionResponse *tev__CreatePullPointSubscriptionResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__GetEventProperties */
int __tev__GetEventProperties(struct soap *soap, struct _tev__GetEventProperties *tev__GetEventProperties, struct _tev__GetEventPropertiesResponse *tev__GetEventPropertiesResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Renew */
int __tev__Renew(struct soap *soap, struct _wsnt__Renew *wsnt__Renew, struct _wsnt__RenewResponse *wsnt__RenewResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Unsubscribe */
int __tev__Unsubscribe(struct soap *soap, struct _wsnt__Unsubscribe *wsnt__Unsubscribe, struct _wsnt__UnsubscribeResponse *wsnt__UnsubscribeResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Subscribe */
int __tev__Subscribe(struct soap *soap, struct _wsnt__Subscribe *wsnt__Subscribe, struct _wsnt__SubscribeResponse *wsnt__SubscribeResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__GetCurrentMessage */
int __tev__GetCurrentMessage(struct soap *soap, struct _wsnt__GetCurrentMessage *wsnt__GetCurrentMessage, struct _wsnt__GetCurrentMessageResponse *wsnt__GetCurrentMessageResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Notify */
int __tev__Notify(struct soap *soap, struct _wsnt__Notify *wsnt__Notify)
{	
	return SOAP_OK;
}


/** Auto-test server operation __tev__GetMessages */
int __tev__GetMessages(struct soap *soap, struct _wsnt__GetMessages *wsnt__GetMessages, struct _wsnt__GetMessagesResponse *wsnt__GetMessagesResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__DestroyPullPoint */
int __tev__DestroyPullPoint(struct soap *soap, struct _wsnt__DestroyPullPoint *wsnt__DestroyPullPoint, struct _wsnt__DestroyPullPointResponse *wsnt__DestroyPullPointResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Notify_ */
int __tev__Notify_(struct soap *soap, struct _wsnt__Notify *wsnt__Notify)
{	
	return SOAP_OK;
}


/** Auto-test server operation __tev__CreatePullPoint */
int __tev__CreatePullPoint(struct soap *soap, struct _wsnt__CreatePullPoint *wsnt__CreatePullPoint, struct _wsnt__CreatePullPointResponse *wsnt__CreatePullPointResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Renew_ */
int __tev__Renew_(struct soap *soap, struct _wsnt__Renew *wsnt__Renew, struct _wsnt__RenewResponse *wsnt__RenewResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__Unsubscribe_ */
int __tev__Unsubscribe_(struct soap *soap, struct _wsnt__Unsubscribe *wsnt__Unsubscribe, struct _wsnt__UnsubscribeResponse *wsnt__UnsubscribeResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__PauseSubscription */
int __tev__PauseSubscription(struct soap *soap, struct _wsnt__PauseSubscription *wsnt__PauseSubscription, struct _wsnt__PauseSubscriptionResponse *wsnt__PauseSubscriptionResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}


/** Auto-test server operation __tev__ResumeSubscription */
int __tev__ResumeSubscription(struct soap *soap, struct _wsnt__ResumeSubscription *wsnt__ResumeSubscription, struct _wsnt__ResumeSubscriptionResponse *wsnt__ResumeSubscriptionResponse)
{	
	/* Return incomplete response with default data values */
	return SOAP_OK;
}
